home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d949.lha
/
BBBBS
/
BBBBS65.lha
/
rexx
/
bbsSpeak.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-08-02
|
2KB
|
110 lines
/* bbsSpeak.rexx 6.2 (2.8.93)
Handles speach for BBBBS - Edit this file to your preferences.
*/
IF GETCLIP('BBS_NOISE')='OFF' THEN EXIT
PARSE ARG com name bbspath saypath .
IF com='LOGON' THEN CALL logon()
IF com='CHAT' THEN CALL chat()
IF com='FILE_REQUEST' THEN CALL file_request()
EXIT
logon:
sp1='Yo sissop.'
sp2=TRANSLATE(name,' ','_')'.'
sp3='has logged awon.'
IF SHOWLIST('H','SPEAK') THEN
DO
IF writeopen('SPEAK:')~=0 THEN
DO
CALL WRITELN(f,sp1)
DO i=1 TO WORDS(sp2)
CALL DELAY(14)
CALL WRITELN(f,WORD(sp2,i))
END
CALL DELAY(14)
CALL WRITELN(f,sp3)
CALL CLOSE(f)
END
END
ELSE IF EXISTS(saypath) THEN
DO
ADDRESS COMMAND saypath sp1
DO i=1 TO WORDS(sp2)
ADDRESS COMMAND saypath WORD(sp2,i)
END
ADDRESS COMMAND saypath sp3
END
RETURN
chat:
CALL DELAY(100)
sp1='Yo sissop.'
sp2=TRANSLATE(name,' ','_')'.'
sp3='wants to chat with you.'
IF SHOWLIST('H','SPEAK') THEN /* check on SPEAK: device */
DO
IF EXISTS(bbspath'BBS_TEXT/YELL') THEN /* we have yell file */
ADDRESS COMMAND 'C:Run C:Type >SPEAK:' bbspath'BBS_TEXT/YELL'
ELSE IF writeopen('SPEAK:')~=0 THEN
DO
CALL WRITELN(f,sp1)
DO i=1 TO WORDS(sp2)
CALL DELAY(14)
CALL WRITELN(f,WORD(sp2,i))
END
CALL DELAY(14)
CALL WRITELN(f,sp3)
CALL WRITELN(f,sp1)
CALL CLOSE(f)
END
END
ELSE IF EXISTS(saypath) THEN /* default to SAY */
DO
IF EXISTS(bbspath'BBS_TEXT/YELL') THEN /* we have yell file */
ADDRESS COMMAND 'C:Run' saypath '-x' bbspath'BBS_TEXT/YELL'
ELSE
DO
ADDRESS COMMAND saypath sp1
DO i=1 TO WORDS(sp2)
ADDRESS COMMAND saypath WORD(sp2,i)
END
ADDRESS COMMAND saypath sp3
ADDRESS COMMAND saypath sp1
END
END
RETURN
file_request:
sp1='Yo sissop.'
sp2='a file is being re kwested.'
IF SHOWLIST('H','SPEAK') THEN
DO
IF writeopen('SPEAK:')~=0 THEN
DO
CALL WRITELN(f,sp1)
CALL WRITELN(f,sp2)
CALL CLOSE(f)
END
END
ELSE IF EXISTS(saypath) THEN
DO
ADDRESS COMMAND saypath sp1
ADDRESS COMMAND saypath sp2
END
RETURN
writeopen:
PARSE ARG fname
CALL CLOSE(f)
ok=OPEN(f,fname,'W')
IF ok=0 THEN RETURN 0
RETURN 1
/* bbsSpeak.rexx */